<template>
    <div class="reserve-chamber">
        <el-row>
            <el-col :offset="18" :span="4" class="grid-cell">
                <el-button @click="createMeetingClick" type="primary" plain>新建会议</el-button>
            </el-col>
        </el-row>
        <div>
            <el-table :data="tableData_3" :header-cell-style="{textAlign: 'center'}"
                      :cell-style="{ textAlign: 'center' }" style="width: 100%">
                <el-table-column label="流程编号" prop="processId" width="150"></el-table-column>
                <el-table-column label="会议标题" prop="title"></el-table-column>
                <el-table-column label="申请人" prop="emp.empName"></el-table-column>
                <el-table-column label="召集人" prop="convener"></el-table-column>
                <el-table-column label="申请部门" prop="emp.dept.deptName"></el-table-column>
                <el-table-column label="人数" prop="peopleNum" width="55"></el-table-column>
                <el-table-column label="会议室名称" prop="chamber.chamberName"></el-table-column>
                <el-table-column label="预计开始时间" prop="kaishiTime"></el-table-column>
                <el-table-column label="预计结束时间" prop="jieshuTime"></el-table-column>
                <el-table-column label="需求" prop="requires"></el-table-column>
                <!--                <el-table-column label="参会人员" prop="presentMember"></el-table-column>-->
                <el-table-column label="当前状态" width="80">
                    <template #default="scope">
                        <template v-if="scope.row.status === 1">
                            <el-tag type="success">申请中</el-tag>
                        </template>
                        <template v-if="scope.row.status === 2">
                            <el-tag type="warning">使用中</el-tag>
                        </template>
                    </template>
                </el-table-column>
                <!--                <el-table-column label="参会人员" prop="presentMember"></el-table-column>-->
                <el-table-column label="申请时间" prop="createTime"></el-table-column>
                <el-table-column label="操作" width="180">
                    <template #default="scope">
                        <el-button size="mini" type="primary"
                                   @click="handleEdit_3(scope.$index, scope.row)" plain>同意
                        </el-button>
                        <el-button size="mini" type="danger"
                                   @click="handleEdit_3_1(scope.$index, scope.row)" plain>不同意
                        </el-button>
                    </template>
                </el-table-column>
            </el-table>
        </div>
    </div>
</template>

<script>
export default {
    name: "ReserveChamberPane",
    data(){
        return {
            tableData_3: [],
        }
    },
    methods:{
        //同意会议申请
        handleEdit_3(index, row) {
            console.log(index, row)
            // this.dialogVisible_2=true;
            // this.formData_2=row
        },

        handleEdit_3_1(index, row) {
            this.dialogVisible_3 = true
            this.formData_3 = row
        }
    }
}
</script>

<style scoped>
.reserve-chamber{

}
</style>
